#include "Screen.h"




CScreen::CScreen(void)
{
	_x = 0;
	_y = 0;
	_width = 800;
	_height = 600;
}

CScreen* CScreen::getInstance()
{
	if (!flag)
	{
		_instance = new CScreen();
		flag = true;
	}
	return _instance;
}

void CScreen::getPosition(float &x, float &y)
{
	x = _instance->_x;
	y = _instance->_y;
}

void CScreen::setPosition(const float &x, const float &y)
{
	_instance->_x  = x;
	_instance->_y =  y;
}

CScreen::~CScreen(void)
{
	flag = false;
}

void CScreen::setSize(int width, int height)
{
	_instance->_width = width;
	_instance->_height = height;
}

RECT CScreen::getRect()
{
	RECT rect;
	rect.left = _instance->_x;
	rect.top = _instance->_y;
	rect.right = rect.left + _instance->_width;
	rect.bottom = rect.top + _instance->_height;

	return rect;
}
CScreen *CScreen::_instance = NULL;
bool CScreen::flag = false;